<property name="requestContextAttribute" value="request"/>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>表格</title>
    <link rel="icon" href="${request.contextPath}/image/code.png">
    <link rel="stylesheet" href="${request.contextPath}/plugins/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${request.contextPath}/css/global.css" media="all">
    <style type="text/css">
		@font-face {
		  font-family: 'Glyphicons Halflings';
		  src: url('${request.contextPath}/fonts/glyphicons-halflings-regular.eot');
		  src: url('${request.contextPath}/ui/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('${request.contextPath}/fonts/glyphicons-halflings-regular.woff') format('woff'), url('${request.contextPath}/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('${request.contextPath}/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
		}
		
		*{
			font-family: "Helvetica Neue",Helvetica,STheiti,微软雅黑,宋体,Arial,Tahoma,sans-serif,serif;
			font-size: 13px;
		}
    
    	body{
    		/*background: #E9E9E9;*/
    		color: #000;
			font-size: 13px;
			margin:0px;
    		padding:0px;
    	}
    	
    	.hm-btn{
    		border:0px;
    		color:blue;
    	}
    </style>
</head>
<body>

<div class="admin-main" style="overflow-x:hidden;">
	<blockquote class="layui-elem-quote">
		<p style="color:#23527C;"><span style="font-size: 14px;padding-right: 10px;color:black;">说明:</span>略。<a class="layui-btn layui-btn-normal layui-btn-mini" href="${request.contextPath}/mg/role/index.do">返回列表</a></p>
	</blockquote>
	
	<fieldset class="layui-elem-field">
		<legend>角色-菜单设置</legend>
		<div class="layui-field-box layui-form">
			<ul id="menuTree"></ul>
			<form method="POST" action="${request.contextPath}/mg/role/saveRoleMenus.do">
				<div class="layui-form-item">
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="submit" class="layui-btn" value="立即提交"/>
							<input type="reset" class="layui-btn layui-btn-primary" value="重置"/>
						</div>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
</div>
<script type="text/javascript" src="${request.contextPath}/plugins/layui/layui.js"></script>
<script type="text/javascript">
layui.use('tree', function() {
				var tree = layui.tree({
					elem: '#menuTree', //指定元素，生成的树放到哪个元素上
					check: 'checkbox', //勾选风格
					skin: 'as', //设定皮肤
					drag: true,//点击每一项时是否生成提示信息
					checkboxName: 'aa[]',//复选框的name属性值
					checkboxStyle: "",//设置复选框的样式，必须为字符串，css样式怎么写就怎么写
					click: function(item) { //点击节点回调
						console.log(item)
					},
					nodes: [ //节点
						{
							name: '常用文件夹', //节点名称
							//id: 1,
							spread: true,
							alias: 'changyong',
							checkboxValue: 1,//复选框的值
							checked: true,//复选框默认是否选中
							children: [{
								name: '所有未读',
								//id: 11,
								alias: 'weidu',
								checked: true,
								checkboxValue: 2
							}, {
								name: '置顶邮件',
								//id: 12
							}, {
								name: '标签邮件',
							//	id: 13,
								checked: false,
								checkboxValue: 3
							}]
						}, {
							name: '我的邮箱',
							//id: 2,
							checked: true,
							spread: true,
							children: [{
								name: 'QQ邮箱',
							//	id: 21,
								checked: true,
								checkboxValue: 4,
								spread: true,
								children: [{
									name: '收件箱',
									//id: 211,
									checked: false,
									checkboxValue: 5,
									children: [{
										name: '所有未读',
									//	id: 2111,
										checked: false,
										checkboxValue: 6,
										children: [{
											name: '一周未读',
											//	id: 2111,
											checked: false,
											checkboxValue: 6
										}]
									}, {
										name: '置顶邮件',
										//id: 2112,
										checked: false,
										checkboxValue: 7
									}, {
										name: '标签邮件',
										id: 2113,
										checked: false,
										checkboxValue: 8
									}]
								}, {
									name: '已发出的邮件',
								//	id: 212,
									checked: false,
									checkboxValue: 9
								}, {
									name: '垃圾邮件',
									//id: 213,
									checked: false,
									checkboxValue: 10
								}]
							}, {
								name: '阿里云邮',
								//id: 22,
								checked: true,
								checkboxValue: 11,
								children: [{
									name: '收件箱',
									//id: 221,
									checked: true,
									checkboxValue: 12
								}, {
									name: '已发出的邮件',
									//id: 222,
									checked: true,
									checkboxValue: 13
								}, {
									name: '垃圾邮件',
									//id: 223,
									checked: true,
									checkboxValue: 14
								}]
							}]
						}
					]
				});
				});

</script>
</body>
</html>